package net.seabookchen.pojo;

import java.util.Date;

import javax.persistence.Id;
import javax.xml.bind.annotation.XmlRootElement;

/**
 * @author schen13
 *
 */
@XmlRootElement(name="news")
public class News {
	private @Id Long id;
	private String news;	
	private Date created;
	
	public News() {}
	
	public News(String news) {
		this.news = news;
		this.created = new Date();
	}
	
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getNews() {
		return news;
	}
	public void setNews(String news) {
		this.news = news;
	}
	public Date getCreated() {
		return created;
	}
	public void setCreated(Date created) {
		this.created = created;
	}

	@Override
	public String toString() {
		return "News [id=" + id + ", news=" + news + ", created=" + created
				+ "]";
	}
	
}
